﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TDSReminder.aspx.cs" Inherits="Main_Reports_ServiceInvoice_TDSReminder" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>TDS Reminder</title>
    <link href="../../../Styles/accounts.css" rel="stylesheet" type="text/css" />
   <style type="text/css">
      .gridstyle
      {
       border-bottom:solid 1px #e1e1e1;
       border-top:solid 1px #e1e1e1;
       border-right:None 0px #e1e1e1;
       border-left:None 0px #e1e1e1;
       }
   </style>

    <script language="javascript" type="text/javascript">
        function printPartOfPage() {
            var printDiv = document.getElementById("pnlPrint").innerHTML;
            var windowUrl = 'about:blank';
            var uniqueName = new Date();
            var windowName = 'Print' + uniqueName.getTime();
            var printWindow = window.open(windowUrl, windowName, 'width=10,height=10');
            printWindow.document.write('<html><link rel="stylesheet" type="text/css" href="../../../Styles/accounts.css" /><body>');
            printWindow.document.write(printDiv);
            printWindow.document.write("</body></html>");
            printWindow.document.close();
            printWindow.focus();
            printWindow.print();
            printWindow.close();
            return false;
        }
        //                    function printwind() {
        //                        document.getElementById("tblDDL").style.visibility = "hidden";
        //                        window.print();
        //                        CheckWindowState();
        //                    }

        //                    function CheckWindowState() {
        //                        if (document.readyState != "interactive") {
        //                            document.getElementById("tblDDL").style.visibility = "visible";
        //                        }
        //                        else {
        //                            setTimeout("CheckWindowState()", 2000);
        //                        }
        //                    }    
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div style="width: 90%; height: 100%; margin-left: 5%; margin-right: 5%;">
        <asp:HiddenField ID="hidControlCounter" runat="server" Value="0" />
        <center>
            <asp:Label ID="lblMsg" runat="server"></asp:Label></center>
        <br />
        <br />
        <table width="100%" id="tblDDL" runat="server" class="tablecontent">
            <tr>
                <td align="left" style="width: 20%;">
                    <asp:HyperLink ID="hyplnkPrint" runat="server" NavigateUrl="#" onclick="return printPartOfPage();"
                        Text="Print"></asp:HyperLink>
                </td>
                <td align="right" style="width: 25%;">
                    <span style="font-weight: bold;">Select Customer/Client</span>
                </td>
                <td align="left" style="width: 55%;">
                    <asp:DropDownList ID="ddlCustomerName" CssClass="dropdown" runat="server" Width="150px"
                        AutoPostBack="true" OnSelectedIndexChanged="ddlCustomerName_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
        <asp:Panel ID="pnlPrint" runat="server">
            <table width="100%" cellpadding="0" cellspacing="0" class="tablecontent" style="height: auto;
                margin: 0;">
                <tr style="height: 96px;">
                    <td colspan="3" align="left">
                        <br />
                        <asp:Label ID="lblCompany" runat="server"></asp:Label><br />
                        <br />
                    </td>
                    <td align="right">
                        <asp:Image ID="imgLogo" runat="server" Width="1.27in" Height="1in" Visible="false" />
                    </td>
                </tr>
                <tr>
                    <td align="left" colspan="2" style="width: 50%; padding: 5px 0px 5px 0px; border-bottom: solid 1px #e1e1e1;
                        border-top: solid 1px #e1e1e1;">
                        <b>&nbsp;&nbsp;Letter No.:</b>&nbsp;<asp:Label ID="lblLetterNo" runat="server"></asp:Label>
                    </td>
                    <td align="right" style="width: 25%; padding: 5px 0px 5px 0px; border-bottom: solid 1px #e1e1e1;
                        border-top: solid 1px #e1e1e1;">
                        <b>Date :</b>
                    </td>
                    <td align="left" style="width: 25%; padding: 5px 0px 5px 0px; border-bottom: solid 1px #e1e1e1;
                        border-top: solid 1px #e1e1e1;">
                        <asp:Label ID="lblDate" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr style="height: 80px;">
                    <td colspan="4" align="left">
                        <asp:Label ID="lblCustomer" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="padding-left: 8px">
                        <br />
                        Dear Sir/madam,<br />
                        Sub :&nbsp;<asp:Label ID="lblSubject" runat="server" Text=""></asp:Label><br />
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="padding-left: 8px">
                        <br />
                        <asp:Label ID="lblInfo" runat="server" Text=""></asp:Label><br />
                        <br />
                    </td>
                </tr>
                <tr style="vertical-align: bottom; height: auto;" align="left">
                    <td colspan="4" style="padding: 0 0 0 0;" valign="top">
                        <asp:GridView ID="grdBillDetail" runat="server" Width="100%" HeaderStyle-HorizontalAlign="Center"
                            AutoGenerateColumns="false" CssClass="gridstyle"  HeaderStyle-CssClass="headerstyle" OnRowDataBound="grdBillDetail_RowDataBound">
                            <Columns>
                                <asp:TemplateField HeaderText="S.No." ItemStyle-Width="5%" HeaderStyle-Font-Bold="true">
                                    <ItemTemplate>
                                        <%#Container.DataItemIndex+1 %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField HeaderText="Bill No." DataField="Particulars" ItemStyle-Width="45%"
                                    HeaderStyle-Font-Bold="true" />
                                <asp:BoundField HeaderText="Bill Date" DataField="TransactionDate" ItemStyle-Width="30%"
                                    DataFormatString="{0:dd/MM/yyyy}" HeaderStyle-Font-Bold="true" />
                                <asp:BoundField HeaderText="Bill Amount" DataField="TDS Amount" ItemStyle-Width="20%"
                                    ItemStyle-HorizontalAlign="Right" DataFormatString="{0:0.00}" HeaderStyle-Font-Bold="true" />
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        &nbsp;
                    </td>
                </tr>
                <tr style="height: 15px;">
                    <td align="left" colspan="2" style="width: 50%;">
                        <asp:Label ID="lblNote" runat="server" Text=""></asp:Label>
                    </td>
                    <td align="right" style="width: 25%;">
                        &nbsp;
                    </td>
                </tr>
                <tr style="height: 50px;">
                    <td colspan="2">
                        &nbsp;
                    </td>
                    <td colspan="2" align="right" valign="bottom">
                        <span style="padding-right: 20px;">Your's Truly</span><br />
                        <b>
                            <asp:Label ID="lblCompYorTruly" runat="server"></asp:Label></b>
                    </td>
                </tr>
                <tr style="height: 16px;">
                    <td colspan="4" align="right" style="width: 100%;">
                        <br />
                        <br />
                        <br />
                        <br />
                        Authorised Signatory<br />
                        <br />
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <br />
        <br />
    </div>
    </form>
</body>
</html>
